package com.lagou.model;

/**

 * TODO: 实现封装考题信息

 */
public class Question implements java.io.Serializable {
    private static final long serialVersionUID = -8528438728027558707L;

    /**
     * 考题题目
     */
    private String title;
    /**
     * 选项A
     */
    private String answerA;
    /**
     * 选项B
     */
    private String answerB;
    /**
     * 选项C
     */
    private String answerC;
    /**
     * 选项D
     */
    private String answerD;
    /**
     * 正确答案
     */
    private String answer;

    public Question() {
    }

    public Question(String title, String answerA, String answerB, String answerC, String answerD, String answer) {
        this.title = title;
        this.answerA = answerA;
        this.answerB = answerB;
        this.answerC = answerC;
        this.answerD = answerD;
        this.answer = answer;
    }

    public Question(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAnswerA() {
        return answerA;
    }

    public void setAnswerA(String answerA) {
        this.answerA = answerA;
    }

    public String getAnswerB() {
        return answerB;
    }

    public void setAnswerB(String answerB) {
        this.answerB = answerB;
    }

    public String getAnswerC() {
        return answerC;
    }

    public void setAnswerC(String answerC) {
        this.answerC = answerC;
    }

    public String getAnswerD() {
        return answerD;
    }

    public void setAnswerD(String answerD) {
        this.answerD = answerD;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    @Override
    public String toString() {
        return "Question{" +
                "title='" + title + '\'' +
                ", answerA='" + answerA + '\'' +
                ", answerB='" + answerB + '\'' +
                ", answerC='" + answerC + '\'' +
                ", answerD='" + answerD + '\'' +
                ", answer='" + answer + '\'' +
                '}';
    }

    public String showAll() {
        return title + '\n' +
                "A." + answerA + '\t' +
                "B." + answerB + '\n' +
                "C." + answerC + '\t' +
                "D." + answerD + '\n' +
                "正确答案：" + answer + '\n';
    }

    public String show() {
        return title + "( )" + '\n' +
                "A." + answerA + '\t' +
                "B." + answerB + '\n' +
                "C." + answerC + '\t' +
                "D." + answerD + '\n';
    }
}
